import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("language", { schema: "charge" })
export class Language {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", { name: "code", length: 100 })
  code: string;

  @Column("json", { name: "texts", nullable: true, comment: "内容" })
  texts: object | null;

  @Column("int", {
    name: "creator_id",
    comment: "创建人",
    unsigned: true,
    default: () => "'0'",
  })
  creatorId: number;

  @Column("int", { name: "create_time", default: () => "'0'" })
  createTime: number;

  @Column("int", { name: "update_time", default: () => "'0'" })
  updateTime: number;
}
